package controller.eventListener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import view.AddressListView;

import controller.command.Command;
import controller.Control;
import controller.command.Delete;

public class ActionListener_DeleteAddressButton implements ActionListener{

	Command delete;
	AddressListView alv;
	
	public ActionListener_DeleteAddressButton(AddressListView alv){
		this.alv = alv;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		delete = new Delete(alv.getSelectedIndex());
		Control.getInstance().storeAndExecute(delete);
	}

}
